Skip to content

feat: migrate to Vite+ (rebase of #155 onto Angular 22 main)#180

Open
chrisjwalk-bot wants to merge 24 commits into
mainfrom
feat/migrate-to-vite-plus-155-rebased
Open

feat: migrate to Vite+ (rebase of #155 onto Angular 22 main)#180
chrisjwalk-bot wants to merge 24 commits into
mainfrom
feat/migrate-to-vite-plus-155-rebased

Conversation

@chrisjwalk-bot

@chrisjwalk-bot chrisjwalk-bot commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Closes #155

This rebases the feat/migrate-to-vite-plus-155 branch onto latest main (Angular 22, MFE federation, E2E CI).

Changes

  • Vite+ replaces Nx: Removes all @nx/*, nx, project.json files, migrations.json, nx.json
  • Oxlint/Oxfmt replaces ESLint/Prettier: Removed all eslint/prettier configs, added .oxlintrc.json
  • Vite+ CLI: vp dev, vp build, vp test, vp lint, vp fmt, vp check — much faster builds
  • MFE preserved: @module-federation/vite federation config with Angular 22 shared deps in root vite.config.ts
  • E2E MFE stub: STUB_MFE_REMOTES=true resolves counter-remote/Routes to local stub via alias + fastCompile
  • vp staged: Replaces lint-staged + .lintstagedrc.cjs with staged key in vite.config.ts
  • CI workflows: Updated to use vp commands, kept E2E tests with Playwright
  • Preview: Uses PREVIEW=true vp build for preview environment
  • Dependencies: All deps updated to match main (Angular 22.0.0, Analog 2.6.0, etc.)

Verification

  • pnpm build:prod — builds 93 chunks in ~6s
  • pnpm test:all — 37 test files, 221 tests pass
  • pnpm e2e — 66 passed, 4 skipped, 0 failures
  • pnpm lint / pnpm fmt — oxlint/oxfmt
  • pnpm start — starts API + web + counter-remote servers

Notes

  • counter-remote MFE didn't exist when the Vite+ branch was originally created — MFE config was added during rebase
  • pnpm.overrides moved from package.json to pnpm-workspace.yaml (pnpm v11 requirement)
  • vp staged runs vp check --fix on pre-commit (format + lint + type checks)

chrisjwalk-bot and others added 22 commits May 10, 2026 13:39
 phase 1)

- Add package.json to all 7 libs for Vite+ workspace ordering
- Replace vite-tsconfig-paths plugin with Vite 8 native resolve.tsconfigPaths
- Replace ESLint with Oxlint (.oxlintrc.json via vp migrate)
- Migrate Prettier config to vite.config.ts fmt block via vp fmt --migrate
- Remove all eslint.config.cjs files from root and all libs
- Remove lint targets from all project.json files
- Rename vite.config.mts -> vite.base.config.mts (shared base config)
- Create new root vite.config.ts for vite-plus workspace task config
- Add vite-plus ^0.1.20 to devDependencies
- Remove: eslint, prettier, eslint-config-prettier, vite-tsconfig-paths,
  @nx/eslint, @nx/eslint-plugin from devDependencies
- Update .lintstagedrc.cjs to use vp lint / vp fmt
- Fix .oxlintrc.json: remove invalid @nx, @angular-eslint, @/ plugin refs
- Apply vp fmt formatting to all files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add 'test: vitest run' script to all 7 lib package.json files
- Add name/scripts to apps/web-app/package.json (test + build)
- Remove Nx @nx/vitest:test targets from all lib project.json files
- Remove Nx test target from web-app project.json (replaced by package.json)
- Update root package.json: test:all/lint/format scripts use vp run
- Rename root build/test scripts to build:all/test:all to avoid vp/Nx conflicts
- Fix vite.base.config.mts: pass tsconfig.spec.json to Angular plugin
  (silences tsconfig.app.json warnings in libs during vp run)
- Run: 'vp run -r test' now runs all 8 packages' unit tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxViteTsPaths() with native resolve.tsconfigPaths in update-packages/vite.config.mts
- Remove @nx/vite from devDependencies
- Remove stale @nx/eslint:lint target from dotnet-builder/project.json
- Update CI: lint/test steps now use vp lint / vp run -r test (no more nx affected)
- Bump pnpm action version from 10 to 11 to match packageManager field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add .oxlintrc.json overrides: disable no-explicit-any and no-non-null-assertion
  in spec files, and no-explicit-any in tools/builders (intentional casts)
- Add oxlint-disable comment in NextStepsRunner.tsx for intentional useEffect deps
- Fix erasing-op warning: 0 * 1000 → 0 in auth.store.spec.ts
- Fix no-empty-file: add export to update-packages test-setup.ts
- Add lint.options.typeAware: false to vite.config.ts (tsgolint incompatible
  with Angular baseUrl / moduleResolution:bundler tsconfig options)

vp check now exits clean: fmt pass, lint pass, 0 warnings, 0 errors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add test.projects to vite.config.ts so vp test delegates to each
package's vite config (which has the Angular plugin properly set up).
Uses Vitest 4 projects API (test.workspace was removed in v4).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Switch from defineConfig(fn) to defineConfig({}) so vp fmt/check can
  read the fmt field without executing plugin code
- Wrap Angular/PWA plugins with lazyPlugins() so they only instantiate
  during build/dev, not when tooling loads the config
- Replace __dirname with import.meta.dirname throughout
- Remove define.import.meta.vitest (required function wrapper)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…currently

- pnpm start now runs both the .NET API and Angular dev server concurrently
  (matching the old nx serve web-app behaviour)
- Add pnpm dev (vp dev), pnpm build (vp build), pnpm check (vp check)
- Add pnpm serve:api for standalone API server
- Remove all stale nx-dependent scripts (affected:*, dep-graph, etc.)
- Add concurrently as devDependency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace nxE2EPreset and @nx/devkit workspaceRoot with plain path.resolve
- Replace nx webServer commands with dotnet run + vp dev
- Update baseURL from 4200 to 5173 (Vite default port)
- Update pnpm e2e to call playwright directly (no nx)
- Remove @nx/playwright and @nx/devkit devDependencies

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove nx, @nx/angular, @nx/esbuild, @nx/js, @nx/node, @nx/vitest,
  @nx/web, @nx/workspace devDependencies
- Remove @trivago/prettier-plugin-sort-imports (replaced by Oxfmt importOrder)
- Delete nx.json, migrations.json, and all project.json files
- Remove .nx ignore entries from vite.config.ts fmt and .oxlintrc.json
- Remove nxConsole VSCode setting
- Remove .nx from pnpm clean script

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove ESLint packages (replaced by Oxlint)
- Remove ts-node, @swc-node/register, @swc/core, @swc/helpers (unused)
- Remove prismjs (replaced by shiki), dotenv (unused)
- Remove tools/update-packages/eslint.config.cjs (dead config)
- Replace nx migrate with pnpm up --latest in update-packages tool
- Remove MigrationTask.hasMigrations and migrations.json merging logic
- Remove __nx__ task grouping from buildMigrationQueue
- Update SKILL.md to reflect new update workflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm/action-setup@v4 reads the version from packageManager in
package.json automatically. Having both causes ERR_PNPM_BAD_PM_VERSION.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm 11 requires explicit approval of packages that run build scripts.
Add onlyBuiltDependencies to silence ERR_PNPM_IGNORED_BUILDS in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The migration commit added an allowBuilds block with placeholder string
values ('set this to true or false') instead of booleans, which caused
pnpm to exit with ERR_PNPM_IGNORED_BUILDS in CI.

onlyBuiltDependencies was already correct in pnpm-workspace.yaml (from
main) and is the right mechanism for pnpm 11. Removed allowBuilds and
reverted the redundant package.json onlyBuiltDependencies addition.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
onlyBuiltDependencies was removed in pnpm v11 and replaced by allowBuilds.
Set all required native build packages to true.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace 'pnpm nx affected' build with 'pnpm build:prod' (vp build).
Remove Pack step — no equivalent in vite+ migration.
Remove Nx base ref setup step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add fileReplacements to root vite.config.ts so NX_TASK_TARGET_CONFIGURATION=preview
swaps environment.ts with environment.preview.ts (pointing to Azure backend).
Update preview.yml to use 'pnpm build:prod' with that env var instead of 'pnpm nx'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- README.md: remove Nx references, update tooling to Vite+, remove
  home.md sync note, fix pnpm version (11+), fix test command (test:all)
- content/home.md: replace README clone with app-focused landing page
  (feature links, notifications, PWA blurb, source link)
- home.ts: update hero title/subtitle to remove Nx references
- assets/home.md: delete stale auto-generated file (was synced from README)
- ngsw-config.json: remove /assets/home.md from service worker cache

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge feat/migrate-to-vite-plus-155 onto main, resolving conflicts:
- vite.config.ts: Kept MFE federation config with updated Angular 22 shared deps
- package.json: Removed Nx/ESLint/Prettier, added vite-plus/oxlint, updated all to main versions
- CI workflows: Updated to use pnpm build:prod (vp build) with PREVIEW env var
- pnpm-workspace.yaml: Clean main version with hono >=4.12.21 override
- Deleted: nx.json, project.json files, eslint configs, prettier configs
- Added: .oxlintrc.json, lib package.json entries, vite-plus configs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add resolve.alias to map counter-remote/Routes to local stub during vite
test mode. The @module-federation/vite plugin doesn't virtualize remote
modules in vitest, so we need an explicit alias for integration tests.

Also add fastCompile: mode === 'test' from main branch's vite config.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pnpm v11 reads overrides from pnpm-workspace.yaml only. The
packageManager field is kept to pin pnpm@11.0.9.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The package.json already declares 'packageManager: pnpm@11.0.9' which
causes pnpm/action-setup@v6 to error when version: 11 is also specified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net

- Add STUB_MFE_REMOTES env to Playwright webServer so E2E dev server
  resolves counter-remote/Routes to the local test stub
- Update lint-staged to use 'vp check --fix' (format + lint + types)
- Remove Nx nxViteTsPaths plugin from counter-remote (use vite
  tsconfigPaths instead)
- Add counter-remote to pnpm start (concurrently starts all 3
  servers: API, web-app host, counter-remote MFE)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net

)

- Add federation plugin + MFE shared deps to root vite.config.ts
  (root config drives vp dev; was missing federation entirely)
- Add STUB_MFE_REMOTES alias so E2E/CI can load without counter-remote
- Enable Analog fastCompile when STUB_MFE_REMOTES is set
- Replace lint-staged + .lintstagedrc.cjs with vp staged in vite.config.ts
- Update husky pre-commit to use vp staged instead of npx lint-staged
- Remove lint-staged devDependency
- Fix E2E hero heading regex (escaped dot to escaped plus)
- Fix E2E navigation strict-mode violations (scope to toolbar/sidenav)
- All 66 E2E tests pass (4 skipped, 0 failures)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://green-water-08792290f-180.eastus2.2.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: migrate off Nx to Vite+

1 participant